﻿
using RXY_Mall.Core;
using RXY_Mall.Data;
using RXY_Mall.Services;
using RXY_Mall.Services.Shop;
using RXY_Mall.Services.Shop.Dto;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Http;

namespace RXY_Mall.AdminApi.Controllers
{
    /// <summary>
    /// 店铺接口
    /// </summary>
    [RoutePrefix("Shop")]
    public class ShopController : BaseApiController
    {
        private RXY_MallContext db ;
        private IShopService shopService;

        public ShopController()
        {
            db = new RXY_MallContext();
            shopService =new ShopService();
        }

        /// <summary>
        /// 批量添加店铺
        /// </summary>
        /// <param name="input">店铺输入信息</param>
        [HttpPost]
        [Route("AddShops")]
        public async Task<ResponseService<bool>> AddShops(AddShopsInput input)
        {
            return await shopService.AddShop(input);
        }
    }
}
